name: Tools

on:
 push:
  paths:
  - '.github/workflows/tools.mapscripts.yml'
  - 'Tools/MapsScripts/Source/**'
  - 'Fallout2/Fallout1in2/mods/fo1_base/maps/**'
  - 'Fallout2/Fallout1in2/mods/fo1_base/scripts/SCRIPTS.LST'

defaults:
 run:
  shell: bash

jobs:

 MapsScripts:
  runs-on: ubuntu-latest
  steps:

  - name: Clone
    uses: actions/checkout@v4

  - name: Prepare
    run:  cmake -S Tools/MapsScripts/Source/ -B Tools/MapsScripts/Build

  - name: Build
    run:  cmake --build Tools/MapsScripts/Build --config Release

  - name: Run
    run:  Tools/MapsScripts/Build/MapsScripts --maps Fallout2/Fallout1in2/mods/fo1_base/maps/ --scripts Fallout2/Fallout1in2/mods/fo1_base/scripts/
